package com.bruan.threadsafe_method;

public class DrawThread extends Thread{
    private Account account;
    @Override
    public void run() {
        account.drawMoney(100000);
    }
    public DrawThread(Account account, String name){
        //传给父类，可以命名 public Thread(  @NotNull  String name )
        super(name);
        this.account = account;
    }
}
